﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true"
    CodeFile="MedicineList.aspx.cs" Inherits="Default2" Title="Медицински картон" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <asp:MultiView ID="mvMedicineList" runat="server">
        <asp:View ID="vPatient" runat="server">
            <table>
                <tr>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong><span style="font-size: 14pt">
                            <br />
                            ЛИСТ ЗА ИСТОРИЯ НА БОЛЕСТТА</span></strong>
                        <br />
                        <br />
                    </td>
                </tr>
                <tr>
                    <td>
                        ИЗБЕРИ ПАЦИЕНТ:
                        <asp:DropDownList ID="ddlPatients" runat="server" AutoPostBack="true" DataSourceID="sdsPatient"
                            DataTextField="PatientName" DataValueField="PatientID" OnSelectedIndexChanged="ddlPatients_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                    <td>
                        Търсене на пациент:&nbsp;
                        <br />
                        ЕГН:<asp:TextBox ID="txtSearchByEGN" runat="server" Width="230px"></asp:TextBox>
                        <br />
                        Име:<asp:TextBox ID="txtSearchByName" runat="server" Width="230px"></asp:TextBox>
                        <br />
                        Фамилия:<asp:TextBox ID="txtSearchByLastName" runat="server" Width="230px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="Търсене" />
                    </td>
                </tr>
            </table>
            <asp:GridView ID="gvSearchResults" runat="server" AutoGenerateColumns="False" DataKeyNames="PatientID"
                DataSourceID="sdsSearchPatients">
                <Columns>
                    <asp:BoundField DataField="PatientID" HeaderText="PatientID" InsertVisible="False"
                        ReadOnly="True" SortExpression="PatientID" />
                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                    <asp:BoundField DataField="MiddleName" HeaderText="MiddleName" SortExpression="MiddleName" />
                    <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
                    <asp:BoundField DataField="EGN" HeaderText="EGN" SortExpression="EGN" />
                    <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" />
                    <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                    <asp:BoundField DataField="CurrentJob" HeaderText="CurrentJob" SortExpression="CurrentJob" />
                    <asp:BoundField DataField="JobCity" HeaderText="JobCity" SortExpression="JobCity" />
                    <asp:BoundField DataField="EducationID" HeaderText="EducationID" SortExpression="EducationID" />
                    <asp:BoundField DataField="Profession" HeaderText="Profession" SortExpression="Profession" />
                    <asp:BoundField DataField="IDCardType" HeaderText="IDCardType" SortExpression="IDCardType" />
                    <asp:BoundField DataField="IDCardNum" HeaderText="IDCardNum" SortExpression="IDCardNum" />
                    <asp:BoundField DataField="IDCardIssuedBy" HeaderText="IDCardIssuedBy" SortExpression="IDCardIssuedBy" />
                    <asp:BoundField DataField="IDCardIssueDate" HeaderText="IDCardIssueDate" SortExpression="IDCardIssueDate" />
                    <asp:CheckBoxField DataField="ISWasIllByHepatit" HeaderText="ISWasIllByHepatit" SortExpression="ISWasIllByHepatit" />
                    <asp:CheckBoxField DataField="InfectiousFriends" HeaderText="InfectiousFriends" SortExpression="InfectiousFriends" />
                    <asp:BoundField DataField="DateOfSignUp" HeaderText="DateOfSignUp" SortExpression="DateOfSignUp" />
                    <asp:BoundField DataField="CompanyID" HeaderText="CompanyID" SortExpression="CompanyID" />
                    <asp:CheckBoxField DataField="IsSendByCompany" HeaderText="IsSendByCompany" SortExpression="IsSendByCompany" />
                    <asp:BoundField DataField="Telephone" HeaderText="Telephone" SortExpression="Telephone" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="sdsSearchPatients" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                SelectCommand="up_SearchPatient" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtSearchByEGN" Name="EGN" PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="txtSearchByName" Name="Name" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="txtSearchByLastName" Name="LastName" PropertyName="Text"
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="sdsPatient" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                SelectCommand="up_PatientsGetNames" SelectCommandType="StoredProcedure" UpdateCommand="up_AttendantsDelete"
                UpdateCommandType="StoredProcedure">
                <UpdateParameters>
                    <asp:Parameter Name="AttendantID" Type="Int32" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </asp:View>
        <asp:View ID="vMedicineList" runat="server">
            <table>
                <tr>
                    <td colspan="2">
                        <strong><span style="font-size: 14pt">
                            <br />
                            ЛИСТ ЗА ИСТОРИЯ НА БОЛЕСТТА</span></strong></td>
                    <td>
                        Дата за следващ преглед:
                        <asp:TextBox ID="txtReminderDate" runat="server"></asp:TextBox>
                        <%--<asp:RangeValidator ID="cvReminderDate" runat="server" ToolTip="Невалидна дата!"
                            ControlToValidate="txtReminderDate" ValidationGroup="vsReminderDateInsert" Type="Date"
                            MaximumValue="31/12/2150" MinimumValue="01/01/1111">*</asp:RangeValidator>--%>
                            <asp:RequiredFieldValidator ID="rfvReminderDate" runat="server" ToolTip="Невалидна дата!" ValidationGroup="vsReminderDateInsert" ControlToValidate="txtReminderDate">*</asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cvReminderDate" runat="server" ToolTip="Невалидна дата!" Type="Date"
                            ControlToValidate="txtReminderDate" ValidationGroup="vsReminderDateInsert"  Operator="DataTypeCheck">*
                        </asp:CompareValidator>    
                        <asp:Button ID="btnReminderDate" runat="server" Text="Въведи" OnClick="btnReminderDate_Click"
                            CausesValidation="true" ValidationGroup="vsReminderDateInsert" />
                        <br />
                        <asp:Label ID="lblErr" runat="server"></asp:Label>
                        <asp:SqlDataSource ID="sdsReminder" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            InsertCommand="up_ReminderInsert" InsertCommandType="StoredProcedure" SelectCommand="up_ReminderGetAll"
                            SelectCommandType="StoredProcedure">
                            <InsertParameters>
                                <asp:ControlParameter Name="Date" Type="DateTime" ControlID="txtReminderDate" />
                                <asp:ControlParameter Name="PatientID" Type="Int32" ControlID="ddlPatients" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <%--  <tr>
                    <td>
                        Арх. №: 
                    </td>
                    <td>
                        Стая №:
                    </td>
                    <td>
                        Легло №:
                       </td>
                </tr>--%>
                <tr>
                    <td style="width: 332px">
                        I. ОБЩИ СВЕДЕНИЯ
                        <br />
                    </td>
                    <td style="width: 10px">
                    </td>
                    <td>
                        II. ПРИЧИНИ ЗА СТАЦИОНИРАНЕ</td>
                </tr>
                <tr>
                    <td style="width: 332px">
                        <asp:DetailsView ID="dvMedicineList" runat="server" DataSourceID="sdsPatients" DataKeyNames="PatientID"
                            AutoGenerateRows="False">
                            <Fields>
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" InsertVisible="False"
                                    ReadOnly="True" SortExpression="PatientID" Visible="False" />
                                <asp:TemplateField HeaderText="ЕГН: " SortExpression="EGN">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtEGN" runat="server" Text='<%# Bind("EGN") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtEGN" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("EGN") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvEGN" runat="server" ToolTip="Въведи ЕГН!" ControlToValidate="txtEGN" ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revEGN" runat="server" ToolTip="Невалиден ЕГН!" ControlToValidate="txtEGN"
                                                ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{10})">*</asp:RegularExpressionValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEGN" runat="server" Text='<%# Bind("EGN") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField SortExpression="Name" HeaderText="Име: ">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtName" runat="server" Width="200px" Text='<%# Bind("Name") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvName" runat="server" ToolTip="Въведи име!" ControlToValidate="txtName"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Презиме:" SortExpression="MiddleName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtMiddleName" runat="server" Text='<%# Bind("MiddleName") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtMiddleName" runat="server" Width="200px" Text='<%# Bind("MiddleName") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblMiddleName" runat="server" Text='<%# Bind("MiddleName") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Фамилия: " SortExpression="LastName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtLastName" runat="server" Text='<%# Bind("LastName") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtLastName" runat="server" Width="200px" Text='<%# Bind("LastName") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvLastName" runat="server" ToolTip="Въведи фамилия!" ControlToValidate="txtLastName"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblLastName" runat="server" Text='<%# Bind("LastName") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Възраст: " SortExpression="Age">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtAge" runat="server" Text='<%# Bind("Age") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtAge" runat="server" Width="200px" Text='<%# Bind("Age") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvAge" runat="server" ToolTip="Въведи възраст!" ControlToValidate="txtAge"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revAge" runat="server" ToolTip="Невалидна възраст!" ControlToValidate="txtAge"
                                                ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{1,})">*</asp:RegularExpressionValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblAge" runat="server" Text='<%# Bind("Age") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Телефон: " SortExpression="Telephone">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtTelephone" runat="server" Width="200px" Text='<%# Bind("Telephone") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvTel" runat="server" ToolTip="Въведи телефон!" ControlToValidate="txtTelephone"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblTelephone" runat="server" Text='<%# Bind("Telephone") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.): " SortExpression="City">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCity" runat="server" Text='<%# Bind("City") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCity" runat="server" Width="200px" Text='<%# Bind("City") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvCity" runat="server" ToolTip="Въведи град!" ControlToValidate="txtCity"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCity" runat="server" Text='<%# Bind("City") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Месторабота: " SortExpression="CurrentJob">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCurrentJob" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtCurrentJob" runat="server" Width="200px" Text='<%# Bind("CurrentJob") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCurrentJob" runat="server" Text='<%# Bind("CurrentJob") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="гр.(с.)" SortExpression="JobCity">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtJobCity" runat="server" Text='<%# Bind("JobCity") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtJobCity" runat="server" Width="200px" Text='<%# Bind("JobCity") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblJobCity" runat="server" Text='<%# Bind("JobCity") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Образование: " SortExpression="EducationID">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtEducationID" runat="server" Text='<%# Bind("EducationID") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlEducationID" runat="server" Width="150px" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID">
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlEducationID" runat="server" Width="150px" DataSourceID="sdsEducation"
                                            DataTextField="NameBG" DataValueField="EducationID" Enabled="False">
                                        </asp:DropDownList></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Професия: " SortExpression="Profession">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtProfession" runat="server" Text='<%# Bind("Profession") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtProfession" runat="server" Width="200px" Text='<%# Bind("Profession") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblProfession" runat="server" Text='<%# Bind("Profession") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Докумен за самоличност: " SortExpression="IDCardType">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardType" runat="server" Text='<%# Bind("IDCardType") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlIDCardType" runat="server" Width="150px" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID">
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlIDCardType" runat="server" Width="150px" DataSourceID="sdsCardType"
                                            DataTextField="NameBG" DataValueField="CardID" Enabled="False">
                                        </asp:DropDownList></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Номер: " SortExpression="IDCardNum">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardNum" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardNum" runat="server" Width="200px" Text='<%# Bind("IDCardNum") %>'></asp:TextBox><asp:RequiredFieldValidator
                                            ID="rfvCardNumber" runat="server" ToolTip="Въведи номер на документ!" ControlToValidate="txtIDCardNum"
                                            ValidationGroup="vsPatientsInsert">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revCardNum" runat="server" ToolTip="Невалиден номер на документ!" ControlToValidate="txtIDCardNum"
                                                ValidationGroup="vsPatientsInsert" ValidationExpression="(^\d{7,})">*</asp:RegularExpressionValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardNum" runat="server" Text='<%# Bind("IDCardNum") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Изаден от: " SortExpression="IDCardIssuedBy">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedBy" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssuedBy" runat="server" Width="200px" Text='<%# Bind("IDCardIssuedBy") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssuedBy" runat="server" Text='<%# Bind("IDCardIssuedBy") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Издаден на:" SortExpression="IDCardIssueDate">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDate" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}")  %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtIDCardIssueDate" runat="server" Width="200px" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}")  %>'></asp:TextBox><asp:RangeValidator
                                            ID="cvIDCardIssueDate" runat="server" ToolTip="Невалидна дата!" ControlToValidate="txtIDCardIssueDate"
                                            ValidationGroup="vsPatientsInsert" Type="Date" MaximumValue="31/12/2150" MinimumValue="01/01/1111">*</asp:RangeValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblIDCardIssueDate" runat="server" Text='<%# Bind("IDCardIssueDate", "{0:dd/MM/yyyy}")  %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="ISWasIllByHepatit" HeaderText="Боледувал от хепатит:"
                                    SortExpression="ISWasIllByHepatit" />
                                <asp:CheckBoxField DataField="InfectiousFriends" HeaderText="Контакт със заразно болни: "
                                    SortExpression="InfectiousFriends" />
                                <asp:TemplateField HeaderText="Дата на записване: " SortExpression="DateOfSignUp">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUpEdit" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}")  %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="txtDateOfSignUp" runat="server" Width="200px" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}")  %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDateOfSignUp" runat="server" Text='<%# Bind("DateOfSignUp", "{0:dd/MM/yyyy}")  %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Изпратен от фирма: " SortExpression="CompanyID">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtCompanyID" runat="server" Text='<%# Bind("CompanyID") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="ddlCompanyID" runat="server" Width="150px" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID">
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlCompanyID" runat="server" Width="150px" DataSourceID="sdsCompany"
                                            DataTextField="CompanyName" DataValueField="CompanyID" Enabled="False">
                                        </asp:DropDownList></ItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                            <FooterTemplate>
                                <br />
                                <br />
                                <br />
                                <asp:LinkButton ID="lbtnBackToList" runat="server" CausesValidation="false" OnClick="lbtnBackToList_Click"
                                    OnClientClick="javascript:return ShowWarning();">Обратно към пациенти</asp:LinkButton>
                            </FooterTemplate>
                        </asp:DetailsView>
                         <asp:SqlDataSource ID="sdsCardType" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_IDCardsSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsPatients" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_PatientsDelete" InsertCommand="up_PatientsCreate" SelectCommand="up_PatientsGetByID"
                            UpdateCommand="up_PatientsUpdate" DeleteCommandType="StoredProcedure" InsertCommandType="StoredProcedure"
                            SelectCommandType="StoredProcedure" UpdateCommandType="StoredProcedure">
                            <DeleteParameters>
                                <asp:Parameter Name="PatientID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="PatientID" Type="Int32" />
                                <asp:Parameter Name="Name" Type="String" />
                                <asp:Parameter Name="middleName" Type="String" />
                                <asp:Parameter Name="lastName" Type="String" />
                                <asp:Parameter Name="EGN" Type="String" />
                                <asp:Parameter Name="Age" Type="Int16" />
                                <asp:Parameter Name="City" Type="String" />
                                <asp:Parameter Name="CurrentJob" Type="String" />
                                <asp:Parameter Name="JobCity" Type="String" />
                                <asp:Parameter Name="EducationID" Type="Int16" />
                                <asp:Parameter Name="Profession" Type="String" />
                                <asp:Parameter Name="IDCardType" Type="Int16" />
                                <asp:Parameter Name="IDCardNum" Type="String" />
                                <asp:Parameter Name="IDCardIssuedBy" Type="String" />
                                <asp:Parameter Name="IDCardIssueDate" Type="DateTime" />
                                <asp:Parameter Name="ISWasIllByHepatit" Type="Boolean" />
                                <asp:Parameter Name="InfectiousFriends" Type="Boolean" />
                                <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                                <asp:Parameter Name="companyID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:ControlParameter ControlID="txtName" Name="Name" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="txtMiddleName" Name="middleName" PropertyName="Text"
                                    Type="String" />
                                <asp:ControlParameter ControlID="txtLastName" Name="lastName" PropertyName="Text"
                                    Type="String" />
                                <asp:ControlParameter ControlID="txtEGN" Name="EGN" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="txtAge" Name="Age" PropertyName="Text" Type="Int16" />
                                <asp:ControlParameter ControlID="txtCity" Name="City" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="txtCurrentJob" Name="CurrentJob" PropertyName="Text"
                                    Type="String" />
                                <asp:ControlParameter ControlID="txtJobCity" Name="JobCity" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="ddlEducation" Name="EducationID" PropertyName="SelectedValue"
                                    Type="Int16" />
                                <asp:Parameter Name="Profession" Type="String" />
                                <asp:ControlParameter ControlID="ddlCardType" Name="IDCardType" PropertyName="SelectedValue"
                                    Type="Int16" />
                                <asp:ControlParameter ControlID="txtCardNum" Name="IDCardNum" PropertyName="Text"
                                    Type="String" />
                                <asp:ControlParameter ControlID="txtCardIssuedBy" Name="IDCardIssuedBy" PropertyName="Text"
                                    Type="String" />
                                <asp:Parameter Name="IDCardIssueDate" Type="DateTime" />
                                <asp:ControlParameter ControlID="rblIsHepatit" Name="ISWasIllByHepatit" PropertyName="SelectedValue"
                                    Type="Boolean" />
                                <asp:ControlParameter ControlID="rblIsContacted" Name="InfectiousFriends" PropertyName="SelectedValue"
                                    Type="Boolean" />
                                <asp:Parameter Name="dateOfSignUp" Type="DateTime" />
                                <asp:Parameter Name="companyID" Type="Int32" />
                            </InsertParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlPatients" Name="PatientID" PropertyName="SelectedValue"
                                    Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsCompany" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_DeleteCompany" DeleteCommandType="StoredProcedure" InsertCommand="up_CreateCompany"
                            InsertCommandType="StoredProcedure" SelectCommand="up_CompanySelect" SelectCommandType="StoredProcedure"
                            UpdateCommand="up_AttendantsDelete" UpdateCommandType="StoredProcedure">
                            <DeleteParameters>
                                <asp:Parameter Name="companyID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="AttendantID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="companyName" Type="String" />
                                <asp:Parameter Name="bULSTAT" Type="String" />
                                <asp:Parameter Name="mOL" Type="String" />
                                <asp:Parameter Name="city" Type="String" />
                                <asp:Parameter Name="address" Type="String" />
                                <asp:Parameter Name="postCode" Type="String" />
                                <asp:Parameter Name="phone" Type="String" />
                                <asp:Parameter Name="invoiceAddress" Type="String" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsIdentity" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_IDCardsSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                    </td>
                    <td style="width: 3px">
                    </td>
                    <td valign="top">
                        <asp:DetailsView ID="dvStationare" runat="server" AutoGenerateRows="False" DataKeyNames="StacioniraneID"
                            DataSourceID="sdsStationareGetByPatient" DefaultMode="Insert" OnItemCommand="dvStationare_ItemCommand"
                            Width="450px" OnItemInserted="dvStationare_ItemInserted" OnItemUpdated="dvStationare_ItemUpdated">
                            <Fields>
                                <asp:BoundField DataField="StacioniraneID" HeaderText="StacioniraneID" Visible="False"
                                    ReadOnly="True" SortExpression="StacioniraneID" />
                                <asp:TemplateField HeaderText="Причина за стациониране: " SortExpression="RFAID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList1" runat="server" Width="80%" DataSourceID="sdsReasonForAcceptance"
                                            DataTextField="NameBG" DataValueField="RFAID" SelectedValue='<%# Bind("RFAID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList1" runat="server" Width="80%" DataSourceID="sdsReasonForAcceptance"
                                            DataTextField="NameBG" DataValueField="RFAID" SelectedValue='<%# Bind("RFAID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("RFAID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="IsUrgent" HeaderText="По спешност: " SortExpression="IsUrgent" />
                                <asp:TemplateField HeaderText="Състояние при постъпването: " SortExpression="ConditionID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList2" Width="80%" runat="server" DataSourceID="sdsCondition"
                                            DataTextField="NameBG" DataValueField="ConditionID" SelectedValue='<%# Bind("ConditionID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList2" Width="80%" runat="server" DataSourceID="sdsCondition"
                                            DataTextField="NameBG" DataValueField="ConditionID" SelectedValue='<%# Bind("ConditionID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ConditionID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Непоносимост към лекарства: " SortExpression="DrugIncomprehensibleID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList3" runat="server" Width="80%" DataSourceID="sdsDrugs"
                                            DataTextField="NameBG" DataValueField="DrugIncomprehensibleID" SelectedValue='<%# Bind("DrugIncomprehensibleID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList3" runat="server" Width="80%" DataSourceID="sdsDrugs"
                                            DataTextField="NameBG" DataValueField="DrugIncomprehensibleID" SelectedValue='<%# Bind("DrugIncomprehensibleID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("DrugIncomprehensibleID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Срок за пост. от нач. на заб.: " SortExpression="TermID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList4" Width="80%" runat="server" DataSourceID="sdsTerms"
                                            DataTextField="NameBG" DataValueField="TermID" SelectedValue='<%# Bind("TermID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList4" Width="80%" runat="server" DataSourceID="sdsTerms"
                                            DataTextField="NameBG" DataValueField="TermID" SelectedValue='<%# Bind("TermID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("TermID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Кръвна група: " SortExpression="BloodGroupID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList5" Width="80%" runat="server" DataSourceID="sdsBloodGroup"
                                            DataTextField="NameBG" DataValueField="BloodGroupID" SelectedValue='<%# Bind("BloodGroupID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList5" Width="80%" runat="server" DataSourceID="sdsBloodGroup"
                                            DataTextField="NameBG" DataValueField="BloodGroupID" SelectedValue='<%# Bind("BloodGroupID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("BloodGroupID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="IsRhFactorPositive" HeaderText="Положителен Rh-фактор: "
                                    SortExpression="IsRhFactorPositive" />
                                <asp:TemplateField HeaderText="Вредни навици: " SortExpression="UnhealthyHabitsID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList6" Width="80%" runat="server" DataSourceID="sdsBadHabit"
                                            DataTextField="HabitName" DataValueField="HabitId" SelectedValue='<%# Bind("UnhealthyHabitsID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList6" Width="80%" runat="server" DataSourceID="sdsBadHabit"
                                            DataTextField="HabitName" DataValueField="HabitId" SelectedValue='<%# Bind("UnhealthyHabitsID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("UnhealthyHabitsID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Други вредни навици: " SortExpression="OtherUnhealthyHabit">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("OtherUnhealthyHabit") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox7" Width="80%" runat="server" Text='<%# Bind("OtherUnhealthyHabit") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("OtherUnhealthyHabit") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Диагноза: " SortExpression="Diagnosis">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox8" Rows="2" Columns="25" TextMode="MultiLine" runat="server"
                                            Text='<%# Bind("Diagnosis") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox8" Rows="2" Columns="25" TextMode="MultiLine" runat="server"
                                            Text='<%# Bind("Diagnosis") %>'></asp:TextBox><asp:RequiredFieldValidator ID="rfvDiagnose"
                                                runat="server" ControlToValidate="textBox8" ValidationGroup="vgStationare">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("Diagnosis") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Дата: " SortExpression="Date">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Date", "{0:dd/MM/yyyy}")  %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox9" Width="80%" runat="server" Text='<%# Bind("Date", "{0:dd/MM/yyyy}")  %>'></asp:TextBox><asp:RangeValidator
                                            ID="cvStationareDate" runat="server" ToolTip="Невалидна дата!" ControlToValidate="TextBox9"
                                            ValidationGroup="vgStationare" Type="Date" MaximumValue="12/12/2150" MinimumValue="01/01/1111">*</asp:RangeValidator><asp:RequiredFieldValidator
                                                ID="rfvStationareDate" runat="server" ControlToValidate="TextBox9" ValidationGroup="vgStationare">*</asp:RequiredFieldValidator></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text='<%# Bind("Date", "{0:dd/MM/yyyy}")  %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Приемащ лекар: " SortExpression="DoctorID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DropDownList7" Width="80%" runat="server" DataSourceID="sdsDoctors"
                                            DataTextField="DoctorName" DataValueField="DoctorID" SelectedValue='<%# Bind("DoctorID") %>'>
                                        </asp:DropDownList></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="DropDownList7" Width="80%" runat="server" DataSourceID="sdsDoctors"
                                            DataTextField="DoctorName" DataValueField="DoctorID" SelectedValue='<%# Bind("DoctorID") %>'>
                                        </asp:DropDownList></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label10" runat="server" Text='<%# Bind("DoctorID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="PatientID" SortExpression="PatientID" Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("PatientID") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox1" Width="80%" runat="server" Text='<%# Bind("PatientID") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label11" runat="server" Text='<%# Bind("PatientID") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <InsertItemTemplate>
                                        <asp:LinkButton ID="lbAddStationare" runat="server" CausesValidation="True" CommandName="Insert"
                                            Text="Въведи" ValidationGroup="vgStationare"></asp:LinkButton>&#160;&#160;&#160;&#160;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Прекрати"></asp:LinkButton></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Update"
                                            Text="Обнови" ValidationGroup="vgStationare"></asp:LinkButton></ItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                        </asp:DetailsView>
                        <br />
                        <br />
                        <asp:GridView ID="gvStationare" runat="server" AutoGenerateColumns="False" DataKeyNames="StacioniraneID"
                            DataSourceID="sdsStationareGetByPatient" AllowPaging="True" OnRowCommand="gvStationare_RowCommand"
                            PageSize="1">
                            <Columns>
                                <asp:TemplateField ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
                                            Text="Разгледай"></asp:LinkButton>&nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
                                            Text="Изтрий"></asp:LinkButton></ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="StacioniraneID" HeaderText="StacioniraneID" InsertVisible="False"
                                    ReadOnly="True" SortExpression="StacioniraneID" Visible="False" />
                                <asp:BoundField DataField="RFAID" HeaderText="RFAID" SortExpression="RFAID" Visible="False" />
                                <asp:CheckBoxField DataField="IsUrgent" HeaderText="IsUrgent" SortExpression="IsUrgent"
                                    Visible="False" InsertVisible="False" />
                                <asp:BoundField DataField="ConditionID" HeaderText="ConditionID" SortExpression="ConditionID"
                                    Visible="False" InsertVisible="False" />
                                <asp:BoundField DataField="DrugIncomprehensibleID" HeaderText="DrugIncomprehensibleID"
                                    SortExpression="DrugIncomprehensibleID" Visible="False" />
                                <asp:BoundField DataField="TermID" HeaderText="TermID" SortExpression="TermID" Visible="False" />
                                <asp:BoundField DataField="BloodGroupID" HeaderText="BloodGroupID" SortExpression="BloodGroupID"
                                    Visible="False" />
                                <asp:CheckBoxField DataField="IsRhFactorPositive" HeaderText="IsRhFactorPositive"
                                    SortExpression="IsRhFactorPositive" Visible="False" />
                                <asp:BoundField DataField="UnhealthyHabitsID" HeaderText="UnhealthyHabitsID" SortExpression="UnhealthyHabitsID"
                                    Visible="False" />
                                <asp:BoundField DataField="OtherUnhealthyHabit" HeaderText="OtherUnhealthyHabit"
                                    SortExpression="OtherUnhealthyHabit" Visible="False" />
                                <asp:TemplateField HeaderText="Диагноза" SortExpression="Diagnosis">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Diagnosis") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox12" runat="server" Columns="25" ReadOnly="True" Rows="2"
                                            Text='<%# Bind("Diagnosis") %>' TextMode="MultiLine"></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Date" HeaderText="Дата" SortExpression="Date" ApplyFormatInEditMode="True"
                                    DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False">
                                    <ItemStyle Width="80px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DoctorID" HeaderText="DoctorID" SortExpression="DoctorID"
                                    Visible="False" />
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" SortExpression="PatientID"
                                    Visible="False" InsertVisible="False" />
                            </Columns>
                        </asp:GridView>
                        <asp:SqlDataSource ID="sdsStationareGetByPatient" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_StacioniraneDelete" DeleteCommandType="StoredProcedure" InsertCommand="up_StacioniraneInsert"
                            InsertCommandType="StoredProcedure" SelectCommand="up_StacioniraneGetByPatientID"
                            SelectCommandType="StoredProcedure" UpdateCommand="up_StacioniraneUpdate" UpdateCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlPatients" Name="PatientID" PropertyName="SelectedValue"
                                    Type="Int32" />
                            </SelectParameters>
                            <DeleteParameters>
                                <asp:Parameter Name="StacioniraneID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:ControlParameter Name="StacioniraneID" Type="Int32" ControlID="gvStationare" />
                                <asp:Parameter Name="RFAID" Type="Int16" />
                                <asp:Parameter Name="IsUrgent" Type="Boolean" />
                                <asp:Parameter Name="ConditionID" Type="Int16" />
                                <asp:Parameter Name="DrugIncomprehensibleID" Type="Int16" />
                                <asp:Parameter Name="TermID" Type="Int16" />
                                <asp:Parameter Name="BloodGroupID" Type="Int16" />
                                <asp:Parameter Name="IsRhFactorPositive" Type="Boolean" />
                                <asp:Parameter Name="UnhealthyHabitsID" Type="Int16" />
                                <asp:Parameter Name="OtherUnhealthyHabit" Type="String" />
                                <asp:Parameter Name="Diagnosis" Type="String" />
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="DoctorID" Type="Int32" />
                                <asp:ControlParameter Name="PatientID" Type="Int32" ControlID="ddlPatients" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="RFAID" Type="Int16" />
                                <asp:Parameter Name="IsUrgent" Type="Boolean" />
                                <asp:Parameter Name="ConditionID" Type="Int16" />
                                <asp:Parameter Name="DrugIncomprehensibleID" Type="Int16" />
                                <asp:Parameter Name="TermID" Type="Int16" />
                                <asp:Parameter Name="BloodGroupID" Type="Int16" />
                                <asp:Parameter Name="IsRhFactorPositive" Type="Boolean" />
                                <asp:Parameter Name="UnhealthyHabitsID" Type="Int16" />
                                <asp:Parameter Name="OtherUnhealthyHabit" Type="String" />
                                <asp:Parameter Name="Diagnosis" Type="String" />
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="DoctorID" Type="Int32" />
                                <asp:ControlParameter Name="PatientID" Type="Int32" ControlID="ddlPatients" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsReasonForAcceptance" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_ResonsForAcceptanceSelect" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsStationareType" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_AcceptanceTypeGetAll" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsEducation" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_EducationSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsReason" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_ResonsForAcceptanceSelect" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsCondition" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_ConditionsSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsDrugs" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_DrugIncomprehensiblesSelect" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsTerms" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_TermsSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsBloodGroup" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_BloodGroupSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsRh" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_RhSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsBadHabit" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_UnhealthyHabitSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsDoctors" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            SelectCommand="up_DoctorsGetNames" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sdsStationare" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_StacioniraneDelete" DeleteCommandType="StoredProcedure" InsertCommand="up_StacioniraneInsert"
                            InsertCommandType="StoredProcedure" SelectCommand="up_StacioniraneGetByPatientID"
                            SelectCommandType="StoredProcedure" UpdateCommand="up_StacioniraneUpdate" UpdateCommandType="StoredProcedure">
                            <DeleteParameters>
                                <asp:Parameter Name="StacioniraneID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="StacioniraneID" Type="Int32" />
                                <asp:Parameter Name="RFAID" Type="Int16" />
                                <asp:Parameter Name="IsUrgent" Type="Boolean" />
                                <asp:Parameter Name="ConditionID" Type="Int16" />
                                <asp:Parameter Name="DrugIncomprehensibleID" Type="Int16" />
                                <asp:Parameter Name="TermID" Type="Int16" />
                                <asp:Parameter Name="BloodGroupID" Type="Int16" />
                                <asp:Parameter Name="IsRhFactorPositive" Type="Boolean" />
                                <asp:Parameter Name="UnhealthyHabitsID" Type="Int16" />
                                <asp:Parameter Name="OtherUnhealthyHabit" Type="String" />
                                <asp:Parameter Name="Diagnosis" Type="String" />
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="DoctorID" Type="Int32" />
                                <asp:Parameter Name="PatientID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="RFAID" Type="Int16" />
                                <asp:Parameter Name="IsUrgent" Type="Boolean" />
                                <asp:Parameter Name="ConditionID" Type="Int16" />
                                <asp:Parameter Name="DrugIncomprehensibleID" Type="Int16" />
                                <asp:Parameter Name="TermID" Type="Int16" />
                                <asp:Parameter Name="BloodGroupID" Type="Int16" />
                                <asp:Parameter Name="IsRhFactorPositive" Type="Boolean" />
                                <asp:Parameter Name="UnhealthyHabitsID" Type="Int16" />
                                <asp:Parameter Name="OtherUnhealthyHabit" Type="String" />
                                <asp:Parameter Name="Diagnosis" Type="String" />
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="DoctorID" Type="Int32" />
                                <asp:Parameter Name="PatientID" Type="Int32" />
                            </InsertParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlPatients" Name="PatientID" PropertyName="SelectedValue"
                                    Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <td>
                        КЛИНИЧНА ДИАГНОЗА</td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:DetailsView ID="dvClinicDiagnose" runat="server" AutoGenerateRows="False" DataKeyNames="ID"
                            DataSourceID="sdsClinicDiagnose" DefaultMode="Insert" Width="800px" OnItemCommand="dvClinicDiagnose_ItemCommand"
                            OnItemInserted="dvClinicDiagnose_ItemInserted" OnItemUpdated="dvClinicDiagnose_ItemUpdated">
                            <Fields>
                                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                                    SortExpression="ID" Visible="False" />
                                <asp:TemplateField HeaderText="Ренгенови изследвания: " SortExpression="Rengen">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Rengen") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Rengen") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Rengen") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ехографски изследвания: " SortExpression="Ehograh">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Ehograh") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Ehograh") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("Ehograh") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="KAT: " SortExpression="KAT">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("KAT") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("KAT") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("KAT") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" SortExpression="PatientID"
                                    Visible="False" />
                                <asp:TemplateField HeaderText="Работна диагноза: " SortExpression="Rabotna">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Rabotna") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Rabotna") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("Rabotna") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Други: " SortExpression="Other">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox5" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Other") %>'></asp:TextBox></EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox5" runat="server" Rows="2" Columns="75" TextMode="MultiLine"
                                            Text='<%# Bind("Other") %>'></asp:TextBox></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("Other") %>'></asp:Label></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <InsertItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Insert"
                                            Text="Въведи"></asp:LinkButton>&#160; &#160;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Прекрати"></asp:LinkButton></InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Update"
                                            Text="Обнови"></asp:LinkButton></ItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                        </asp:DetailsView>
                        <asp:SqlDataSource ID="sdsClinicDiagnose" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
                            DeleteCommand="up_ClinicDiagnosisDelete" DeleteCommandType="StoredProcedure"
                            InsertCommand="up_ClinicDiagnosisInsert" InsertCommandType="StoredProcedure"
                            SelectCommand="up_ClinicDiagnosisGetAllByPatientID" SelectCommandType="StoredProcedure"
                            UpdateCommand="up_ClinicDiagnosisUpdate" UpdateCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlPatients" Name="PatientID" PropertyName="SelectedValue"
                                    Type="Int32" />
                            </SelectParameters>
                            <DeleteParameters>
                                <asp:Parameter Name="ID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="ID" Type="Int32" />
                                <asp:Parameter Name="Rengen" Type="String" />
                                <asp:Parameter Name="Rabotna" Type="String" />
                                <asp:Parameter Name="Ehograh" Type="String" />
                                <asp:Parameter Name="KAT" Type="String" />
                                <asp:Parameter Name="Other" Type="String" />
                                <asp:ControlParameter ControlID="ddlPatients" Name="patientID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="ID" Type="Int32" />
                                <asp:Parameter Name="Rengen" Type="String" />
                                <asp:Parameter Name="Rabotna" Type="String" />
                                <asp:Parameter Name="Ehograh" Type="String" />
                                <asp:Parameter Name="KAT" Type="String" />
                                <asp:Parameter Name="Other" Type="String" />
                                <asp:ControlParameter ControlID="ddlPatients" Name="patientID" Type="Int32" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:GridView ID="gvClinicDiagnose" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            DataKeyNames="ID" DataSourceID="sdsClinicDiagnose" PageSize="2" OnRowCommand="gvClinicDiagnose_RowCommand">
                            <Columns>
                                <asp:TemplateField ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
                                            Text="Разгледай"></asp:LinkButton>&nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
                                            Text="Изтрий"></asp:LinkButton></ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                                    SortExpression="ID" Visible="False" />
                                <asp:TemplateField HeaderText="Ренген" SortExpression="Rengen">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Rengen") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Rengen") %>'></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Работна" SortExpression="Rabotna">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Rabotna") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Rabotna") %>'></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ехограф" SortExpression="Ehograh">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Ehograh") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Ehograh") %>'></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="KAT" SortExpression="KAT">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("KAT") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("KAT") %>'></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" SortExpression="PatientID"
                                    Visible="False" />
                                <asp:TemplateField HeaderText="Други" SortExpression="Other">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox5" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Other") %>'></asp:TextBox></EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox5" runat="server" Rows="2" Columns="13" TextMode="MultiLine"
                                            ReadOnly="True" Text='<%# Bind("Other") %>'></asp:TextBox></ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </asp:View>
        <%--OLD ONE BEGIN PLEASE DO NOT DELETE FOR NOW--%>
        <%-- <asp:View ID="vMedicineListOld" runat="server">
            <table width="70%">
                <tr>
                    <td colspan="5" style="height: 21px; text-align: center">
                        <strong><span style="font-size: 14pt">
                            <br />
                            ЛИСТ ЗА ИСТОРИЯ НА БОЛЕСТТА</span></strong></td>
                </tr>
                <tr>
                    <td colspan="5" style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td colspan="5" style="text-align: center">
                        Арх№<asp:TextBox ID="txtArhNumber" runat="server"></asp:TextBox>
                        Стая№<asp:TextBox ID="txtRoomNumber" runat="server"></asp:TextBox>
                        Легло№<asp:TextBox ID="txtBedNumber" runat="server"></asp:TextBox></td>
                </tr>
            </table>
            <br />
            <table style="border-right: #330066 thin solid; border-top: #330066 thin solid; border-left: #330066 thin solid;
                border-bottom: #330066 thin solid" width="65%">
                <tr>
                    <td colspan="4" style="height: 21px;">
                        <em><span style="color: #006600;">ІІ. ПРИЧИНИ ЗА СТАЦИОНИРАНЕ</span></em></td>
                </tr>
                <tr>
                    <td>
                        Причини за стациониране:</td>
                    <td align="left">
                        <asp:DropDownList ID="ddlReason" runat="server" DataSourceID="sdsReason" DataTextField="NameBG"
                            DataValueField="RFAID">
                        </asp:DropDownList>
                    </td>
                    <td>
                        Вид на стационирането:</td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblAcceptanceType" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0" Text="Планово"></asp:ListItem>
                            <asp:ListItem Value="1" Text="По спешност"></asp:ListItem>
                        </asp:RadioButtonList></td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td>
                        Състояние при постъпване:</td>
                    <td align="left">
                        <asp:DropDownList ID="ddlCondition" runat="server" DataSourceID="sdsCondition" DataTextField="NameBG"
                            DataValueField="ConditionID">
                        </asp:DropDownList>
                    </td>
                    <td style="background-color: #CCCCCC">
                        Непоносимост към лекарства</td>
                    <td align="left">
                        <asp:DropDownList ID="ddlDrugIncomprehence" runat="server" DataSourceID="sdsDrugs"
                            DataTextField="NameBG" DataValueField="DrugIncomprehensibleID">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td>
                        Срок за пост. от нач. заб:</td>
                    <td colspan="3">
                        <asp:DropDownList ID="ddlTerms" runat="server" DataSourceID="sdsTerms" DataTextField="NameBG"
                            DataValueField="TermID">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td>
                        Кръвна група:</td>
                    <td colspan="3">
                        <asp:RadioButtonList ID="rblBloodGroup" runat="server" RepeatDirection="Horizontal"
                            DataSourceID="sdsBloodGroup" DataTextField="NameBG" DataValueField="BloodGroupID">
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td>
                        Rh - фактор</td>
                    <td colspan="3">
                        <asp:RadioButtonList ID="rblRh" runat="server" RepeatDirection="Horizontal" DataSourceID="sdsRh"
                            DataTextField="NameBG" DataValueField="RhID">
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td>
                        Вредни Навици<br />
                        (алкохол, тютюнопушене...)
                    </td>
                    <td colspan="3">
                        <asp:TextBox ID="txtBadHabits" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Диагноза</td>
                    <td colspan="3">
                        <asp:TextBox ID="txtDiagnose" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Дата:</td>
                    <td>
                        Дежурен лекар(приемащ):</td>
                    <td>
                        <asp:DropDownList ID="ddlDoctors" runat="server">
                        </asp:DropDownList></td>
                    <td>
                        код:
                        <asp:DropDownList ID="ddlCode" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <table style="border-right: #330066 thin solid; border-top: #330066 thin solid; border-left: #330066 thin solid;
                border-bottom: #330066 thin solid" width="65%">
                <tr>
                    <td>
                        <i>Клинична диагноза</i></td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        Рентгенови изследвания:</td>
                    <td>
                        <asp:TextBox ID="txtRadioscopy" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Работна (предварителна)</td>
                    <td>
                        <asp:TextBox ID="txtPreliminary" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Ехографски изследвания:</td>
                    <td>
                        <asp:TextBox ID="txtEchography" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Окончателна (основно
                        <br />
                        заболяване, придружителни
                        <br />
                        заболявания, усложнения)</td>
                    <td>
                        <asp:TextBox ID="txtConclusive" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        КАТ.</td>
                    <td>
                        <asp:TextBox ID="txtCat" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        ДРУГИ
                    </td>
                    <td>
                        <asp:TextBox ID="txtOthers" runat="server" Rows="5" TextMode="MultiLine" Columns="70"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <asp:Button ID="BtnAdd" runat="server" OnClick="BtnAdd_Click" Text="Добави" />
            <br />--%>
        <%--</asp:View>--%>
        <%--OLD ONE END--%>
    </asp:MultiView>
</asp:Content>
